<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="linkCategoryDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='linkCategoryDetail.heading'/>"/>
</head>

<s:form id="linkCategoryForm" action="saveLinkCategory" method="post" validate="true">
    <s:textfield key="linkCategory.id" required="true" cssClass="text medium"/>
    <s:textfield key="linkCategory.name" required="false" cssClass="text medium"/>
    <!-- todo: change this to read the identifier field from the other pojo -->
    <s:select name="linkCategory.linkType.id" list="linkTypeList" listKey="id" listValue="id"></s:select>

    <li class="buttonBar bottom">
        <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
        <c:if test="${not empty linkCategory.id}">
            <s:submit cssClass="button" method="delete" key="button.delete"
                onclick="return confirmDelete('LinkCategory')" theme="simple"/>
        </c:if>
        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
    </li>
</s:form>

<script type="text/javascript">
    Form.focusFirstElement($("linkCategoryForm"));
</script>
